#ifndef SKINLABEL_H
#define SKINLABEL_H

#include <QLabel>

class SkinLabel : public QLabel
{
	Q_OBJECT

public:
	SkinLabel(QWidget *parent = NULL);
	~SkinLabel();

signals:
	void Hover(QString mainWnd);
	void Click(QString mainWnd);
	void Leave();

public:
	inline void SetBkImage(QString bk)
	{
		m_bk.load(bk);
	}
	inline void SetBorderColor(QColor border)
	{
		m_border = border;
	}
	inline void SetMainWndBk(QString mainWnd)
	{
		m_MainBk = mainWnd;
	}
protected:
	bool event(QEvent* e);
	void paintEvent(QPaintEvent* e);
	void mouseMoveEvent(QMouseEvent* e);
	void mousePressEvent(QMouseEvent* e);
private:
	QPixmap m_bk;
	QColor m_border;
	QString m_MainBk;
	bool hover;
};

#endif // SKINLABEL_H
